import java.util.Scanner;

public class test {

    public static void pageOne() {
        int i[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
        int start = 1;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入起始页码：");
        int page = scanner.nextInt();
        System.out.println("请输入每页显示页的数目：");
        int num = scanner.nextInt();    //这里为了配合下面的分页，定为奇数
//		int num = 5;
        int pages[] = new int[num];
        int avg = num/2;
        System.out.println(avg);
        if (page < avg+1 || page > i.length-avg) {
            if(page<avg+1){
                for (int j = 0; j < num; j++) {
                    System.out.print("[" + i[j] + "]");
                }
            }else if(page>i.length-avg){
                System.out.println("-----------");
                int s = num-(i.length-page)+1;
                System.out.println(s);
                for(int j=i.length-s;j<i.length;j++){
                    System.out.print("[" + i[j] + "]");
                }
            }
        } else {
            System.out.println("===================");
            for (int j = page - avg -1; j < page + avg; j++) {
                System.out.print("[" + i[j] + "]");
            }
        }
    }
}
